#include "mychildwidget.h"
#include <QPainter>
#include <QMouseEvent>

MyChildWidget::MyChildWidget(QWidget *parent) : QWidget(parent)
{

}

MyChildWidget::~MyChildWidget()
{

}

void MyChildWidget::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event);

    QPainter p(this);
    p.setPen(Qt::NoPen);
    p.setBrush(Qt::cyan);
    p.drawRect(rect());
}


void MyChildWidget::mousePressEvent(QMouseEvent *event)
{
    qDebug("MyChildWidget::mousePressEvent: x=%d, y=%d\n", event->x(), event->y());
    event->ignore();
}
void MyChildWidget::mouseMoveEvent(QMouseEvent *event)
{
    qDebug("MyChildWidget::mouseMoveEvent: x=%d, y=%d\n", event->x(), event->y());
    event->ignore();
}
void MyChildWidget::mouseReleaseEvent(QMouseEvent *event)
{
    qDebug("MyChildWidget::mouseReleaseEvent: x=%d, y=%d\n", event->x(), event->y());
    event->ignore();
}
